package com.aorise.model.response;

import com.aorise.utils.DataValidationUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Auther: zhouhao
 * @Date: 2019/5/29
 * @Description:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserInfoRes implements Serializable{

    @ApiModelProperty(value = "用户ID,用户列表不需要传",example = "2" )
    private Integer userId;

    @ApiModelProperty(value = "账号",example = "test" )
    @Length(max = 20,message = "账号长度不能超过20")
    private String account;

    @ApiModelProperty(value = "姓名",example = "test" )
    @Length(max = 20,message = "姓名长度能超过20")
    private String username;

    @ApiModelProperty(value = "角色",example = "test" )
    private String role;

    @ApiModelProperty(value = "职务",example = "test" )
    private String dept;

    @ApiModelProperty(value = "组织",example = "test" )
    private String org;

    @ApiModelProperty(value = "电话",example = "test" )
    @Pattern(regexp = DataValidationUtil.V_MOBILENULL,message ="手机号码必须为整数")
    @Length(max = 11,message = "手机号码不能超过11位数")
    private String phone;

    @ApiModelProperty(value = "角色ID",example = "test" )
    private Integer roleId;

    @ApiModelProperty(value = "组织ID",example = "test" )
    private Integer orgId;

    @ApiModelProperty(value = "拼接组织ID",example = "test" )
    private String oParentId;


}
